<?php

/**
 * sfFormGuiQuestion form base class.
 *
 * @package    form
 * @subpackage sf_form_gui_question
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BasesfFormGuiQuestionForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'             => new sfWidgetFormInputHidden(),
      'sf_form_gui_id' => new sfWidgetFormPropelSelect(array('model' => 'sfFormGui', 'add_empty' => false)),
      'name'           => new sfWidgetFormInput(),
      'description'    => new sfWidgetFormTextarea(),
      'widget'         => new sfWidgetFormInput(),
      'published'      => new sfWidgetFormInputCheckbox(),
      'required'       => new sfWidgetFormInputCheckbox(),
      'rank'           => new sfWidgetFormInput(),
      'created_at'     => new sfWidgetFormDateTime(),
      'updated_at'     => new sfWidgetFormDateTime(),
      'owner_id'       => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'             => new sfValidatorPropelChoice(array('model' => 'sfFormGuiQuestion', 'column' => 'id', 'required' => false)),
      'sf_form_gui_id' => new sfValidatorPropelChoice(array('model' => 'sfFormGui', 'column' => 'id')),
      'name'           => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'description'    => new sfValidatorString(array('required' => false)),
      'widget'         => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'published'      => new sfValidatorBoolean(array('required' => false)),
      'required'       => new sfValidatorBoolean(array('required' => false)),
      'rank'           => new sfValidatorInteger(),
      'created_at'     => new sfValidatorDateTime(array('required' => false)),
      'updated_at'     => new sfValidatorDateTime(array('required' => false)),
      'owner_id'       => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('sf_form_gui_question[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'sfFormGuiQuestion';
  }


}
